﻿package org.leles.utils 
{
	
	/**
	 * ...
	 * @author Bruno leles
	 */
	public class RegExpUtil 
	{
		protected static var regexpEmail:RegExp;
		
		public static function testEmail(p_sEmail:String):Boolean
		{
			if ( ! regexpEmail )
				regexpEmail = new RegExp(/^([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/);
			return regexpEmail.test( p_sEmail );
		}
		
		public static function testYoutubeURL(p_sURL:String):Boolean
		{
			// not implemented
			return false;
		}
	}
	
}